package com.acsior.hibernate.vo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * Contragent entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "contragents")
@GeneratorKey(tableName = "contragents")
public class ContragentVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = 6079068905878582128L;

	@Column(name = "billing", nullable = false)
	private boolean billing;

	@Column(name = "bulstat", length = 100)
	private String bulstat;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cdBigClient")
	private List<CdCRCodeVO> cashServices;

	@Column(name = "contact_address", length = 250)
	private String contactAddress;

	@Column(name = "contact_person", length = 100)
	private String contactPerson;

	@Column(name = "contact_phone_number", length = 100)
	private String contactPhoneNumber;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contragent")
	private List<ContragentContractVO> contragentContracts;

	@Column(name = "email", length = 100)
	private String email;

	@Column(name = "extern", nullable = false)
	private boolean external;

	@Column(name = "head_office_address", length = 250)
	private String headOfficeAddress;

	@Column(name = "in_dds", length = 100)
	private String inDDSNumber;

	@Column(name = "marketing", nullable = false)
	private boolean marketing;

	@Column(name = "mol", length = 100)
	private String mol;

	@Column(name = "name", nullable = false, length = 100)
	private String name;

	@Column(name = "notes", length = 250)
	private String notes;

	@Column(name = "other", nullable = false)
	private boolean other;

	@Column(name = "payment", nullable = false)
	private boolean payment;

	@Column(name = "subscription", nullable = false)
	private boolean subscription;

	@Column(name = "trade", nullable = false)
	private boolean trade;

	@Column(name = "uin", nullable = false, length = 100)
	private String uin;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contragent")
	private List<WebSystemVO> webSystems;

	/** default constructor */
	public ContragentVO() {
		this.webSystems = new ArrayList<WebSystemVO>();
		this.contragentContracts = new ArrayList<ContragentContractVO>();
		this.cashServices = new ArrayList<CdCRCodeVO>();
	}

	/** @return the bulstat */
	public String getBulstat() {
		return this.bulstat;
	}

	/**
	 * @return стойността на cashServices
	 */
	public List<CdCRCodeVO> getCashServices() {
		return this.cashServices;
	}

	/** @return the contactAddress */
	public String getContactAddress() {
		return this.contactAddress;
	}

	/** @return the contactPerson */
	public String getContactPerson() {
		return this.contactPerson;
	}

	/** @return the contactPhoneNumber */
	public String getContactPhoneNumber() {
		return this.contactPhoneNumber;
	}

	/** @return the contragentContracts */
	public List<ContragentContractVO> getContragentContracts() {
		return this.contragentContracts;
	}

	/** @return the email */
	public String getEmail() {
		return this.email;
	}

	/** @return the headOfficeAddress */
	public String getHeadOfficeAddress() {
		return this.headOfficeAddress;
	}

	/**
	 * @return стойността на inDDSNumber
	 */
	public String getInDDSNumber() {
		return this.inDDSNumber;
	}

	/** @return the mol */
	public String getMol() {
		return this.mol;
	}

	/** @return the name */
	public String getName() {
		return this.name;
	}

	/** @return the notes */
	public String getNotes() {
		return this.notes;
	}

	/** @return the uin */
	public String getUin() {
		return this.uin;
	}

	/** @return the webSystems */
	public List<WebSystemVO> getWebSystems() {
		return this.webSystems;
	}

	/** @return the billing */
	public boolean isBilling() {
		return this.billing;
	}

	/** @return the external */
	public boolean isExternal() {
		return this.external;
	}

	/** @return the marketing */
	public boolean isMarketing() {
		return this.marketing;
	}

	/**
	 * @return the other
	 */
	public boolean isOther() {
		return this.other;
	}

	/** @return the payment */
	public boolean isPayment() {
		return this.payment;
	}

	/** @return the subscription */
	public boolean isSubscription() {
		return this.subscription;
	}

	/** @return the trade */
	public boolean isTrade() {
		return this.trade;
	}

	/**
	 * @param billing
	 *            the billing to set
	 */
	public void setBilling(boolean billing) {
		this.billing = billing;
	}

	/**
	 * @param bulstat
	 *            the bulstat to set
	 */
	public void setBulstat(String bulstat) {
		this.bulstat = bulstat;
	}

	/**
	 * @param cashServices
	 *            се залага в cashServices
	 */
	public void setCashServices(List<CdCRCodeVO> cashServices) {
		this.cashServices = cashServices;
	}

	/**
	 * @param contactAddress
	 *            the contactAddress to set
	 */
	public void setContactAddress(String contactAddress) {
		this.contactAddress = contactAddress;
	}

	/**
	 * @param contactPerson
	 *            the contactPerson to set
	 */
	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	/**
	 * @param contactPhoneNumber
	 *            the contactPhoneNumber to set
	 */
	public void setContactPhoneNumber(String contactPhoneNumber) {
		this.contactPhoneNumber = contactPhoneNumber;
	}

	/**
	 * @param contragentContracts
	 *            the contragentContracts to set
	 */
	public void setContragentContracts(List<ContragentContractVO> contragentContracts) {
		this.contragentContracts = contragentContracts;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @param external
	 *            the external to set
	 */
	public void setExternal(boolean external) {
		this.external = external;
	}

	/**
	 * @param headOfficeAddress
	 *            the headOfficeAddress to set
	 */
	public void setHeadOfficeAddress(String headOfficeAddress) {
		this.headOfficeAddress = headOfficeAddress;
	}

	/**
	 * @param inDDSNumber
	 *            се залага в inDDSNumber
	 */
	public void setInDDSNumber(String inDDSNumber) {
		this.inDDSNumber = inDDSNumber;
	}

	/**
	 * @param marketing
	 *            the marketing to set
	 */
	public void setMarketing(boolean marketing) {
		this.marketing = marketing;
	}

	/**
	 * @param mol
	 *            the mol to set
	 */
	public void setMol(String mol) {
		this.mol = mol;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param notes
	 *            the notes to set
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	/**
	 * @param other
	 *            the other to set
	 */
	public void setOther(boolean other) {
		this.other = other;
	}

	/**
	 * @param payment
	 *            the payment to set
	 */
	public void setPayment(boolean payment) {
		this.payment = payment;
	}

	/**
	 * @param subscription
	 *            the subscription to set
	 */
	public void setSubscription(boolean subscription) {
		this.subscription = subscription;
	}

	/**
	 * @param trade
	 *            the trade to set
	 */
	public void setTrade(boolean trade) {
		this.trade = trade;
	}

	/**
	 * @param uin
	 *            the uin to set
	 */
	public void setUin(String uin) {
		this.uin = uin;
	}

	/**
	 * @param webSystems
	 *            the webSystems to set
	 */
	public void setWebSystems(List<WebSystemVO> webSystems) {
		this.webSystems = webSystems;
	}
}